package com.kk.dateAndTime;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.TimeInterval;

public class TimeIntervalClient {
    public static void main(String[] args) throws InterruptedException {

        TimeInterval timer = DateUtil.timer();
        Thread.sleep(5000);
        //花费毫秒书数
        long interval = timer.interval();

        long interval2 = timer.intervalSecond();

        //返回花费时间，并重置开始时间
        long l = timer.intervalRestart();

        //花费分钟数
        long l1 = timer.intervalMinute();

    }
}
